package com.yxe.service.impl;

import com.yxe.api.CommonResult;
import com.yxe.pojo.House;
import com.yxe.mapper.HouseMapper;
import com.yxe.service.HouseService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lyl
 * @since 2022-12-10
 */
@Service
public class HouseServiceImpl extends ServiceImpl<HouseMapper, House> implements HouseService {

    @Autowired
    private HouseMapper houseMapper;
    @Override
    public List<House> findHouse(House house) {
        return houseMapper.findHouse(house);
    }

    @Override
    public List<House> findAll() {
        return houseMapper.findAll();
    }

    @Override
    public List<House> findHouseByName(String name) {
        return houseMapper.findHouseByName(name);
    }

    @Override
    public void addContract(House house) {
        houseMapper.addContract(house);
    }

}
